<?php
$T->loadTpl("./html/".$template."/".$qname.".html");
$T->SetTpl('cssjs','html/cssjs.inc'); 
$T->SetTpl('jsmodel','html/jsmodel.inc');     

$id=isset($_GET["id"])?$_GET["id"]:"0";
if($id!="0"){
    $role=$T->db->query("SELECT * FROM sys_custom_group where id=".$id)->fetch(PDO::FETCH_ASSOC);
    $T->Set("grpname",$role["grpname"]);
    $T->Set("fg",$role["flag"]);
    $T->Set("id",$role["id"]);
    $T->Set("smech",$role["mech"]);
}else{
    $T->Set("fg","0");
    $T->Set("smech","");
}  

$T->Set("template",$template);         
$T->clearNaN();       
$T->clearNoN();
$T->display(); 